package dao;

import java.math.BigDecimal;

import javax.persistence.EntityManager;
import javax.persistence.NoResultException;

import org.junit.Test;

import util.Date_String;
import util.EntityManagerUtil;
import entity.History;
import entity.HistoryPK;

public class HistoryDao {
	public static History getHistory(String rno,String cid,String btime){
		EntityManager em=EntityManagerUtil.getEntityManager();
		HistoryPK Historypk=new HistoryPK();
		Historypk.setRno(rno);
		Historypk.setCid(cid);
		Historypk.setBtime(Date_String.setDateYmd(btime));
		History History = null;
		try{
			History =em.find(History.class, Historypk);
		}catch(NoResultException e){
			History = null;
		}
		em.close();
		return History;
	}
}
